package com.company.oa.hr.dto.employee;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class EmployeeDTO {
    private Long id;
    
    @NotBlank(message = "员工编号不能为空")
    private String employeeNo;
    
    @NotBlank(message = "姓名不能为空")
    private String name;
    
    @NotNull(message = "性别不能为空")
    private Integer gender;
    
    @NotNull(message = "出生日期不能为空")
    private Date birthDate;
    
    @NotBlank(message = "身份证号不能为空")
    @Pattern(regexp = "(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)", message = "身份证号格式不正确")
    private String idCard;
    
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;
    
    @Email(message = "邮箱格式不正确")
    private String email;
    
    private String address;
    private String education;
    private String school;
    private String major;
    
    @NotNull(message = "部门不能为空")
    private Long departmentId;
    
    @NotNull(message = "职位不能为空")
    private Long positionId;
    
    @NotNull(message = "入职日期不能为空")
    private Date entryDate;
    
    @NotNull(message = "试用期不能为空")
    private Integer probationMonths;
    
    private String emergencyContact;
    private String emergencyPhone;
    private String remark;
} 